<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<style>
.tree,.tree li ul{
	padding-left: 5px;
}
</style>
<form id="permissionForm" class="form">
<div style="float: left;">
  <input type="hidden" name="id" value="${resources.id}">
  <div class="form-item">
    <label for="parent">父资源</label>
    <select id="parent" name="parent" class="easyui-combotree" data-options="editable:false,url:'/resources/permission/combo',value:'${resources.parent.id }'" style="width: 202px"></select>
  </div>
  <div class="form-item required">
    <label for="name">资源名称</label>
    <input id="name" name="name" type="text" class="easyui-textbox" data-options="required:true" value="${resources.name}">
  </div>
  <div class="form-item required">
    <label for="permissionKey">资源标识</label>
    <input id="permissionKey" name="permissionKey" type="text" class="easyui-textbox" data-options="required:true" value="${resources.permissionKey}">
  </div>
  <div class="form-item">
    <label for="resource">资源</label>
    <textarea id="resource" name="resource" class="easyui-textbox" data-options="multiline:true" style="height: 100px;width: 202px">${resources.resource}</textarea>
  </div>
 </div>
  <div style="float: right;"> 
  <div class="form-item">
    <label for="type">资源类型</label>
    <select id="type" name="type" class="easyui-combobox" data-options="value:'${resources.type }'" style="width: 202px">
      <option value="MENU">菜单</option>
      <option value="FUNCTION">功能</option>
      <option value="BLOCK">区域</option>
    </select>
  </div>
  <div class="form-item">
    <label for="path">菜单路径</label>
    <input id="path" type="text" name="path" class="easyui-textbox" value="${resources.path }">
  </div>
 
  <div class="form-item">
    <label for="weight">权重</label>
    <input id="weight" name="weight" min="0" class="easyui-numberspinner" value="${resources.weight}" style="width: 50px">
    <label for="enable">状态</label>
    <input id="enable" name="enable" class="easyui-switchbutton" data-options="onText:'启用',offText:'禁用',checked:${empty resources || resources.enable == true  ?'true' : 'false' }">
  </div>
   <div class="form-item">
    <label for="description">描述</label>
    <textarea id="description" name="description" class="easyui-textbox" data-options="multiline:true"  style="height: 100px;width: 202px">${resources.description}</textarea>
  </div>
  </div>
</form>
